package com.ellwood.common.core.utils;

import cn.hutool.core.collection.CollUtil;

import java.util.Collection;

/**
 * @ProjectName: Ellwood-framework-boot
 * @PackageName: com.ellwood.common.core.utils
 * @ClassName: EllCollUtil
 * @Description: // 集合工具类
 * @Author: Ellwood
 * @CreateDate: 2024/7/15 - 上午11:35
 * @Version: V1.0.0
 */
public class EllCollUtil extends CollUtil {

    public static boolean isNotNull(Collection<?> collection) {
        return !isNull(collection);
    }

    public static boolean isNull(Collection<?> collection) {
        return collection == null;
    }

    public static boolean notContains(Collection<?> collection, Object value) {
        return !contains(collection, value);
    }

    /**
     * 集合是否为非空
     *
     * @param collection 集合
     * @return 是否为非空
     */
    public static boolean isNotEmpty(Collection<?> collection) {
        return !isEmpty(collection);
    }

}
